Skip to content

feat(core): add cloud_auth config + credential persistence - #1054

Merged
KrumTy merged 1 commit into
feat/RED-209367/agent-cloud-provisioningfrom
feat/RED-210013/2/cloud-auth-config
Jul 27, 2026
Merged

feat(core): add cloud_auth config + credential persistence#1054
KrumTy merged 1 commit into
feat/RED-209367/agent-cloud-provisioningfrom
feat/RED-210013/2/cloud-auth-config

Conversation

@KrumTy

@KrumTy KrumTy commented Jul 24, 2026

Copy link
Copy Markdown

Summary

Adds the configuration surface that turns an OIDC-minted Redis Cloud API key into a usable
cloud profile. It defines where a profile's login endpoints live and how the resulting key is
persisted.

  • A [cloud_auth.<profile>] config section (CloudAuthConfig: Okta issuer, client id, SM API
    base, CAPI base) with built-in production defaults. Kept separate from stored credentials
    because it describes how to log in, not the resulting keys.
  • Config::resolve_cloud_auth — a profile's endpoints, or the production defaults when unset.
  • Config::apply_cloud_login — writes a minted credential into a normal cloud profile (OS
    keyring by default via CredentialStore, plaintext fallback) and records the login endpoints
    so re-login works after the key is cleared.
  • CredentialStore::plaintext() for the explicit no-keyring path.

Fully additive: no existing config behaviour changes.

Scope

  • Affected areas: crates/redisctl-core/src/config/*, src/lib.rs (re-exports).
  • API surface changes: new public CloudAuthConfig; new Config::resolve_cloud_auth and Config::apply_cloud_login; CredentialStore::plaintext(). No existing APIs changed.
  • Docs/tests: module docs + 5 integration tests (endpoint round-trip, production-default fallback, profile persistence).

Testing

cargo test -p redisctl-core # lib tests + cloud_auth_config integration tests
cargo clippy --workspace --all-targets --all-features -- -D warnings

Checklist

  • Scope and plan documented in this description
  • Tests added/updated; both success and error cases covered
  • Docs updated (module overviews, examples)
  • cargo fmt, clippy (-D warnings), tests pass locally
  • CI status is green
  • Ready for review (remove Draft)
  • Squash and merge when approved

@KrumTy
KrumTy marked this pull request as ready for review July 24, 2026 12:02
@KrumTy
KrumTy requested a review from a team July 24, 2026 12:02
@KrumTy
KrumTy force-pushed the feat/RED-210012/1/cloud-auth-core branch from 000dda9 to ae45692 Compare July 24, 2026 12:57
@KrumTy
KrumTy force-pushed the feat/RED-210013/2/cloud-auth-config branch from 3e9810a to e3f5363 Compare July 24, 2026 12:59
@KrumTy
KrumTy force-pushed the feat/RED-210013/2/cloud-auth-config branch from e3f5363 to 74a76de Compare July 27, 2026 11:56
Base automatically changed from feat/RED-210012/1/cloud-auth-core to feat/RED-209367/agent-cloud-provisioning July 27, 2026 12:05
Adds the config surface that turns a minted API key into a usable profile:

- `[cloud_auth.<profile>]` section (`CloudAuthConfig`: okta_issuer, client id,
  sm_api_url, capi_url) with built-in production defaults and an
  `is_complete()` check; kept separate from stored credentials since it
  describes *how to log in*, not the resulting keys.
- `Config::resolve_cloud_auth` (profile entry, else prod defaults) and
  `Config::apply_cloud_login`, which writes an `auth::MintedCredentials` into
  a normal cloud profile (keyring by default via `CredentialStore`, plaintext
  fallback) and records the login endpoints for re-login.
- `CredentialStore::plaintext()` for the `--allow-plaintext` path.

Additive; no existing config behaviour changes. Integration-tested
(round-trip, prod-default fallback, profile persistence).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@KrumTy
KrumTy force-pushed the feat/RED-210013/2/cloud-auth-config branch from 74a76de to bbab913 Compare July 27, 2026 12:10
@KrumTy
KrumTy merged commit 28c1aa4 into feat/RED-209367/agent-cloud-provisioning Jul 27, 2026
6 checks passed
@KrumTy
KrumTy deleted the feat/RED-210013/2/cloud-auth-config branch July 27, 2026 12:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants